<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 300px;
        height: 300px;
        border: 1px solid;
        margin: auto;
        /* border-radius: 50%; */
        background-color: #ccc;
        animation: myfirst 1s linear 0s infinite;
      }

      @keyframes myfirst {
        0% {
          transform: rotate(0deg);
          background: red;
        }
        25% {
          background: yellow;
        }
        50% {
          background: blue;
        }
        100% {
          transform: rotate(360deg);
          background: green;
        }
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
